package cn.cdqf.service.impl;

import cn.cdqf.bean.TDepart;
import cn.cdqf.mapper.DepartMapper;
import cn.cdqf.service.DepartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DepartServiceImpl implements DepartService {
    @Autowired
    private DepartMapper departMapper;

    @Override
    public List<TDepart> queryDepart(int pageStart,int pageSize) {
        return departMapper.queryDepart(pageStart,pageSize);
    }

    @Override
    public int getTotalCount() {
        return departMapper.getTotalCount();
    }

    @Override
    public int addDepart(TDepart tDepart) {
        return departMapper.addDepart(tDepart);
    }

    @Override
    public int deleteDepart(Integer id) {
        return departMapper.deleteDepart(id);
    }

    @Override
    public TDepart queryDepartById(Integer id) {
        return departMapper.queryDepartById(id);
    }

    @Override
    public int updateDepart(Integer id ,String name, String createtime) {
        return departMapper.updateDepart(id,name,createtime);
    }

    @Override
    public List<TDepart> getDeparts() {
        return departMapper.getDeparts();
    }
}
